package mybatis.sqlsession;

import mybatis.cfg.Configuration;
import mybatis.defaults.DefaultSqlSessionFactory;
import mybatis.utils.XmlConfigBuilder;

import java.io.InputStream;

public class SqlSessionFactoryBuilder {

    public SqlSessionFactory build(InputStream config){
        Configuration configuration = XmlConfigBuilder.loadConfiguration(config);
        return new DefaultSqlSessionFactory(configuration);
    }
}
